<template>
    <div id="id">
        <div class="id_top">{{this.$route.params.type}}</div>
        <ul class="id_ul">

            <li v-for="(val,index) in tableInfo" :key="index">
                <nuxt-link :to="{name:'details-id',params:{id:val._id,title:val.title}}">
                    <i style="margin-right:10px;" class="iconfont icon-xuanzhong"></i>{{val.title}}
                </nuxt-link>
            </li>

        </ul>
    </div>
</template>
<script>
import axios from "axios"
export default {
  data() {
    return {
      tableInfo: ["我的文章", "我的文章12", "我的文章13"]
    };
  },
  created(){
      axios({
          url:"http://116.85.32.125:8765/api/QueryContent?id="+this.$route.params.id,
          method:"get",
      }).then(response=>{
         this.tableInfo = response.data.result;
      }).catch(error=>{
          console.log(error)
      })
  }
};
</script>
<style scoped lang="scss">
#id {
  margin-left: 250px;
  padding-left: 35px;
  padding-right: 85px;
  margin-top: 35px;
  .id_top {
    font-size: 20px;
    font-weight: bold;
  }
  .id_ul {
    margin-top: 30px;

    > li {
      list-style: none;
      margin-bottom: 10px;
      > a {
        text-decoration: none;
        color: #2479cc;
        margin-bottom: 15px;
        &:Hover{
            color:black;
            transition:2s;
        }
        > i {
          display: none;
        }

        > i {
          display: inline-block;
          color: black;
        }
      }
    }
  }
}
</style>
